package Lesson;

import java.util.Comparator;
import java.util.Set;
import java.util.TreeSet;

public class Lesson {
    public static void main(String[] args) {
        int[] a = {1,2,3,3,4,5,1,2,7};
        Set<Integer> set = new TreeSet<>(new Comparator<Integer>() {
            @Override
            public int compare(Integer o1, Integer o2) {
                return o2-o1;
            }
        });

        for (Integer i:a){
            set.add(i);
        }
        for (Integer i:set){
            System.out.print(i);
        }
    }
}
